﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Editor.ascx.cs" Inherits="Marbles.CMS.ContentTypes.Article.Editor" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="asp" %>
<div style="background:white;border:solid 1px silver;padding:4px;">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr><td>Name:</td><td>&nbsp;</td><td><asp:TextBox ID="txtName" runat="server" MaxLength="50" Columns="50" Width="360px" /><asp:RequiredFieldValidator ID="valName" ControlToValidate="txtName" runat="server" ForeColor="Red" Text=" *" ErrorMessage="Name is Required" InitialValue="" /> <asp:CheckBox ID="chkVisible" runat="server" Checked="true" Text="Visible?" /> <asp:CheckBox ID="chkAnonymous" runat="server" Checked="true" Text="Anonymous?" /></td><td align="right">Type:&nbsp;<asp:DropDownList ID="drpType" runat="server" /><asp:RequiredFieldValidator ID="valType" ControlToValidate="drpType" runat="server" ForeColor="Red" Text=" *" ErrorMessage="Type is Required" InitialValue="" /></td></tr>
<tr><td>Parent:</td><td>&nbsp;</td><td colspan="2"><asp:DropDownList ID="drpParent" runat="server" /><asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="drpTemplate" runat="server" ForeColor="Red" Text=" *" ErrorMessage="Template is Required" InitialValue="" /></td></tr>
<tr><td>Template:</td><td>&nbsp;</td><td colspan="2"><asp:DropDownList ID="drpTemplate" runat="server" OnSelectedIndexChanged="drpTemplate_SelectedIndexChanged" AutoPostBack="true" /><asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="drpTemplate" runat="server" ForeColor="Red" Text=" *" ErrorMessage="Template is Required" InitialValue="" /></td></tr>
<tr><td>Title:</td><td>&nbsp;</td><td colspan="2"><asp:TextBox ID="txtTitle" runat="server" MaxLength="255" Columns="255" Width="850px" /><asp:RequiredFieldValidator ID="valTitle" ControlToValidate="txtTitle" runat="server" ForeColor="Red" Text=" *" ErrorMessage="Title is Required" InitialValue="" /></td></tr>
<tr><td>Description:</td><td>&nbsp;</td><td colspan="2"><asp:TextBox ID="txtDescription" runat="server" MaxLength="255" Columns="255" Width="850px" /><asp:RequiredFieldValidator ID="valDescription" ControlToValidate="txtDescription" runat="server" ForeColor="Red" Text=" *" ErrorMessage="Description is Required" InitialValue="" /></td></tr>
<tr><td>Keywords:</td><td>&nbsp;</td><td colspan="2"><asp:TextBox ID="txtKeywords" runat="server" MaxLength="255" Columns="255" Width="850px" /></td></tr>
</table>
<asp:Panel ID="pnlEditorScroll" runat="server" ScrollBars="Both" Height="340px">
<asp:DataList ID="lstContent" runat="server" DataKeyField="Key" Width="98%"  BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"  OnItemDataBound="lstContent_ItemDataBound" >
<ItemTemplate>
<asp:Label ID="lblKey" runat="server" Text="" Font-Bold="true" />
<asp:Editor ID="txtContent" runat="server"  Width="99%"  Height="25px"  SuppressTabInDesignMode="true"  InitialCleanUp="true" />
</ItemTemplate>
</asp:DataList>
</asp:Panel>
<hr />
<asp:Button ID="btnSave"  CausesValidation="true" runat="server" CommandName="Update" OnCommand="btnSave_Command" text="Save" ToolTip="Save Changes" />&nbsp;
<asp:Button ID="btnCancel"  CausesValidation="false" runat="server" Text="Cancel" ToolTip="Cancel Changes" OnClientClick="window.location.href='Default.aspx?action=ArticleList';return false;" />

<asp:ValidationSummary ID="valSum" runat="server" EnableClientScript="true" DisplayMode="BulletList"  HeaderText="Please Correct the Following Errors" ShowMessageBox="true" ShowSummary="false"  ForeColor="Red" />
</div>